- /* sloldvdb.cpp by K.Tsuru */
- // function ID = 229 DRADIX
- /*********************************
- SLong class
- operator SLong(m)/double(n)
- See "slomuldb.cpp".
- **********************************/
- #ifndef SN_H
- #include "sn.h"
- #endif
- SLong operator/(const SLong& m, double n){
- if(n == 1.0) return m;
- if(n == -1.0) return -m;
- if(fabs(n) < 1.0) m.SetError(m.DIVIDED_BY_ZERO,"SL /", 229);
- if(m.Sign(229)==0) return m;
-
- SLong r;
- if( fabs(n) <= (double)m.SlOpMaxValue() ){
- ulong p = (ulong)fabs(n);
- r = LsDiv(m, p);
- if(n < 0) r.ChangeSign();
- } else {
- r = n;
- r = LLDiv(m, r, 0).quot;
- }
- return r;
- }
sloldvdb.cpp : last modifiled at 2015/11/27 14:22:52(632 bytes)
created at 2017/10/07 10:26:50
The creation time of this html file is 2017/11/09 14:52:03 (Thu Nov 09 14:52:03 2017).